package com.chen.service;

import com.chen.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chen.entity.vo.UserDTO;
import com.chen.entity.vo.UserPasswordDTO;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Y·C
 * @since 2023-04-19
 */
public interface UserService extends IService<User> {

    UserDTO login(UserDTO userDTO);

    User register(UserDTO userDTO);

    void updatePassword(UserPasswordDTO userPasswordDTO);

    UserDTO loginFront(UserDTO userDTO);

    User registerFront(UserDTO userDTO);

    void updatePasswordFront(UserPasswordDTO userPasswordDTO);

    void manageInfo(User user);

    void adoptByCids(List<Integer> ids);

    /**
     * 用户锁定
     *
     * @param id
     * @param state 0：锁定 1：正常
     */
    Boolean lock(Integer id, Integer  state);

}
